<?php
	header('Content-Type: text/plain');
	echo $_SERVER['HTTP_USER_AGENT'] . "\n\n";
	$act = @$_GET['a'];
	if($act == '')
	{
		$browser = get_browser(null, true);
		print_r($browser);
	}
	elseif($act == 'regex')
	{
		//$pat = '/^mozilla\/5\.0 \(iphone; u; cpu iphone os .* like mac os x; .*\) applewebkit\/.* \(khtml, like gecko\) version\/([0-9.]+) .*$/i';
		$pat = '/iphone;/i';
		echo $pat . "\n\n";
		var_dump(preg_match($pat, $_SERVER['HTTP_USER_AGENT'], $matches));
		print_r($matches);
	}
?>